using System;

namespace PropertyExpression.ControllableQuery.Test.Queries.StringBuilding
{
    public class PublicationTypeInsertQuery : INonQuery
    {
        private readonly IParam<Guid> publicationTypeId;
        private readonly IParam<int> code;
        private readonly IParam<NVarChar<L4000>> description;
        private readonly IParam<Decimal<P18, S7>> decimal1;
        private readonly IParam<Money> money1;

        public PublicationTypeInsertQuery(
            IParam<Guid> publicationTypeId,
            IParam<int> code, 
            IParam<NVarChar<L4000>> description,
            IParam<Decimal<P18, S7>> decimal1,
            IParam<Money> money1)
        {
            this.publicationTypeId = publicationTypeId;
            this.code = code;
            this.description = description;
            this.decimal1 = decimal1;
            this.money1 = money1;
        }

        public string TransformText()
        {
            publicationTypeId.ToSql("@PublicationTypeId");
            code.ToSql("@Code");
            description.ToSql("@Description");
            decimal1.ToSql("@Decimal1");
            money1.ToSql("@Money1");
            return
@"INSERT INTO
    PublicationType
    (
     PublicationTypeId,
     Code,
     Description,
     Decimal1,
     Money1
    )
VALUES
    (@PublicationTypeId,
     @Code,
     @Description,
     @Decimal1,
     @Money1
     )";
        }
    }
}